This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Enable agent restart without impacting running services#63
Merged
soenkeliebau merged 6 commits intomainfrom Feb 22, 2021
Merged
Enable agent restart without impacting running services#63soenkeliebau merged 6 commits intomainfrom
soenkeliebau merged 6 commits intomainfrom
Conversation
…eviction on shutdown.
…ods when shutting down. Draining all pods on agent shudown would mean stopping all services that are managed by the agent, which is not feasible for our scenario. Also added check during startup whether the service is already up and running, if it is already running we don't start it again.
lfrancke
previously approved these changes
Feb 18, 2021
Member
lfrancke
left a comment
There was a problem hiding this comment.
Just one real comment. I'll leave it up to you.
| @@ -8,8 +8,8 @@ edition = "2018" | |||
| # We are currently referencing the Krustlet directly from the repository, because some features that we are using have | |||
| # (exponential backoff most prominently) have not yet been included in a release | |||
| # We will look to move this to officially released versions as soon as possible | |||
Member
There was a problem hiding this comment.
Maybe update this comment?
To say why we reference a fork.
| async fn next(self: Box<Self>, pod_state: &mut PodState, _: &Pod) -> Transition<PodState> { | ||
| if let Some(systemd_units) = &pod_state.service_units { | ||
| for unit in systemd_units { | ||
| match pod_state.systemd_manager.is_running(&unit.get_name()) { |
Member
There was a problem hiding this comment.
I hate that this is basically a copy from below but I don't know a better way right now either...
lfrancke
approved these changes
Feb 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change dependency on Krustlet to use our fork, which skips draining pods when shutting down.
Draining all pods on agent shudown would mean stopping all services that are managed by the agent, which is not feasible for our scenario.
Also added check during startup whether the service is already up and running, if it is already running we don't start it again.
fixes #24